<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Common\Library\COM;

/**
 * Description of OrderDo
 *
 * @author gangguo
 */
class BookDo {
    //put your code here

    static public function getMyObject(){
         P(get_instance_of(__CLASS__));
    }


    static public function getBook(){
        return new \Common\Model\BookModel();
    }


    /**
     * 书籍名称是否存在
     * @param type $book_name
     * @return boolean
     */
    static public function checkBookName($book_name){
        if(self::getBook()->searchBookName($book_name)){
            return TRUE;
        }
        return FALSE;
    }

    static public function getContent(){
        $data = fopen('./1.html','rb');
        $contents = fread($data,filesize('./1.html'));
        return  $contents;//输出字符串
    }



}
